package cn.lcl.bean;

import sun.rmi.server.InactiveGroupException;

/**
 * Created by licho on 2017/8/18 0018.
 */
public class ThreadLocalPageBean {
    private static final ThreadLocal<Integer> pageIndex=new ThreadLocal<Integer>() ;
    private static final ThreadLocal<Integer> pageSize=new ThreadLocal<>();
    public static void setPageSize(Integer pageSize){
        ThreadLocalPageBean.pageSize.set(pageSize);
    }
    public static  Integer getPageSize(){
        return ThreadLocalPageBean.pageSize.get();
    }
    public static void setPageIndex(Integer pageIndex){
        ThreadLocalPageBean.pageIndex.set(pageIndex);
    }
    public static  Integer getPageIndex(){
        return ThreadLocalPageBean.pageIndex.get();
    }

    public static  void removePageIndex(){
        ThreadLocalPageBean.pageIndex.remove();
    }
    public static  void removePageSize(){
        ThreadLocalPageBean.pageSize.remove();
    }
}
